import axios from '../utils/axios'
import { api } from '../utils/api'
import UserModel from '../interface/userinterface'


export const userQuery = (params: string) => {
    return axios({
        method: "get",
        url: api.list.query,
        params
    })
}

export const userChange = (data: any) => {
    return axios({
        method: "post",
        url: api.list.change,
        data
    })
}

export const userReduce = (data: number) => {
    return axios({
        method: "delete",
        url: api.list.reduce + data
    })
}

export const userAdd = (data: UserModel) => {
    return axios({
        method: "post",
        url: api.list.add,
        data
    })
}